package com.ext.portlet.registration.service.impl;

import java.rmi.RemoteException;
import java.util.List;

import com.ext.portlet.registration.model.Student;
import com.ext.portlet.registration.service.base.StudentLocalServiceBaseImpl;
import com.ext.portlet.registration.service.persistence.StudentUtil;
import com.liferay.portal.PortalException;
import com.liferay.portal.SystemException;


public class StudentLocalServiceImpl extends StudentLocalServiceBaseImpl {
	
	public List<Student> getAllStudents()
    	throws PortalException, SystemException, RemoteException {		
		
    return studentPersistence.findAll();
    }
	
	public List<Student> getByStatus(Integer status) 
		throws SystemException {	
		
	return StudentUtil.findByStatus(status);
	}	
	
	public Student StudentValidation(Long schoolId, String rollNo) 
		throws SystemException{		
		
		 return studentPersistence.fetchByStudentValidation(schoolId, rollNo);		
	}	
	
	public Student getByLoginId(String loginId) throws SystemException{		
		
		return StudentUtil.fetchByLoginId(loginId);
	}
	
	public Student getBySchoolIdRollNo(Long schoolId,String rollNo) throws SystemException{		
		
		return StudentUtil.fetchBySchoolIdRollNo(schoolId,rollNo);
	}
	
	public  List<Student> getByStudentAndStatus(Long schoolId, Integer status) 
		throws SystemException {		

	return studentPersistence.findBySchoolIdandStatus(schoolId, status);		
}	
}
